import datetime
import geo.geomodel
import logging as log
import geo.geomath

from google.appengine.ext import db
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext.webapp import template
from django.utils import simplejson as json

class GetCategoriesHandler(webapp.RequestHandler):
    
    def get(self):
		if (self.request.get("type")=="cat"):
			json_user = {'cat':str('Shopping,Resturants,Nightlife')}
		else:
			cat=self.request.get("cat")
			if (cat=="Shopping"):
				json_user = {'sub':str('Supermarket,Clothing,Footwear,Underwear,Fostering,Jewellery,Furniture,Leisure,Toys,Electricity,Equipment & Tools')}
			if (cat=="Resturants"):
				json_user = {'sub':str('Coffee House,Fast Food,Resturants,Ice Cream')}
			if (cat=="Nightlife"):
				json_user = {'sub':str('Bars & Pubs,Clubs')}
		self.response.out.write(json.dumps(json_user))
			